<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">

    <!-- 引入 layui.js -->
    <script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
</head>
<body>
<table class="layui-table">
    <colgroup>
        <col width="150">
        <col width="200">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>#</th>
        <th>订单号</th>
        <th>实际金额</th>
        <th>支付金额</th>
        <th>用户ID</th>
        <th>商品ID</th>
        <th>订单状态</th>
        <th>类型</th>
    </tr>
    </thead>
    @foreach($data as $item)
        <tbody>
        <tr>
            <td>{{$item->id}}</td>
            @if($item->status == 4)
                <td style="color: red">{{$item->order_no}}</td>
            @else
                <td><a href="/be?id={{$item->id}}">{{$item->order_no}}</a></td>
            @endif

            <td>{{$item->price}}</td>
            <td>{{$item->real_price}}</td>
            <td>{{$item->uid}}</td>
            <td>{{$item->goods_id}}</td>
            @if($item->status == 1)
            <td>未完成</td>
            @elseif($item->status == 2)
                <td>已完成</td>
            @else
                <td>待支付</td>
            @endif
            @if($item->type == 1)
                <td>全额预售</td>
            @else
                <td>定金预售</td>
            @endif
        </tr>
        @endforeach
        </tbody>
</table>
</body>
</html>
